package com.qf.springmvcdemo;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;


public class WebServlerInit extends SpringBootServletInitializer {

    // Tomcat启动的时候回触发
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        System.out.println("Tomcat启动了，我要开始初始化SpringBoot了。。。。");
        // 初始化Spring容器
        return builder.sources(SpringmvcDemoApplication.class);
    }
}
